package com.example.mapper;

import cn.hutool.json.JSONObject;
import com.example.entity.*;
import com.example.entity.others.User_Question;
import com.example.entity.others.User_Subject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TeacherMapper {

    List<Test_User> getTestUserListByUid(int uid);

    JSONObject getTestById(Test_User testUser);

    void createTest(Test test);

    void createTestUser(Test_User testUser);

    void createQuestion(Question question);

    void createQuestionTeacher(Question_Teacher questionTeacher);

    List<User_Question> getUqcByTestidTeacher(int tid, int uid);

    void deleteTestUser(Test_User testUser);

    List<Question> getAllByTid(Test test);

    void deleteQuestion(Question_Teacher questionTeacher);

    void updateTest(Test test);

    void updateQTById(Question_Teacher qs);

    List<User_Question> getUqfByTestidTeacher(int tid, int uid);

    List<User_Question> getUqsByTestidTeacher(int tid, int uid);

    void createClass(Class_Teacher classTeacher);

    void createClassTeacher(Class_Teacher classTeacher);

    Class_Teacher getClassOneByteaid(Class_Teacher classTeacher);

    void updateClass(Class_Teacher classTeacher);

    List<JSONObject> getClassBytid(Class_Teacher classTeacher);

    List<Integer> getclassIdsByTeaid(User_Subject userSubject);

    List<Integer> getsIdsByclssiIds(@Param("classIds")List<Integer> classIds);

    void updateQTByIdAi(Question_Teacher questionTeacher);

    List<Integer> getQuestionId(int tid);

    void resetQuestion(int uid, Integer qid);

    Test_User getTestUserByTidUid(Test_User testUser);

    void createQuestionStudent(Question_Student questionStudent);

    List<JSONObject> getAnalysisList(Analysis_Teacher analysisTeacher);

    int getAnameSubject(Analysis_Teacher analysisTeacher);

    List<Test_User> getTestBySId(@Param("uids")List<Integer> uids);

    String gerKnpoint(Test_User test);

    int getTrueCount(int uid, int tid);

    int getFalseCount(int uid, int tid);

    void createAnalysis(Analysis_Teacher analysisTeacher);

    void deleteAnalysis(Analysis_Teacher analysisTeacher);

    Analysis_Teacher getAnalysisContent(int aid);

    List<JSONObject> getFaultList(@Param("sIds")List<Integer> sIds);
}
